home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / MKDIR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  283 b   |  17 lines

  1. /*mkdir.c function, from page 380 of turbo c bible */
  2. #include<stdio.h>
  3. #include<dir.h>
  4. main(int argc, char **argv)
  5. {
  6.     if(argc < 2)
  7.     {
  8.         printf("Usage: %s <pathname>\n", argv[0]);
  9.     }
  10.     else
  11.     {
  12.         if(mkdir(argv[1]) != 0);
  13.             {
  14.             perror("error in \"mkdir\"");
  15.             }
  16.     }
  17. }